package com.molichuxing.services.infrastructure.service.impl;

import com.molichuxing.services.infrastructure.bean.DeviceParamDictBean;
import com.molichuxing.services.infrastructure.convertor.Convert;
import com.molichuxing.services.infrastructure.dao.DeviceParamDictMapper;
import com.molichuxing.services.infrastructure.dto.response.DeviceParamDictDto;
import com.molichuxing.services.infrastructure.service.DeviceParamDictService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author zph
 * @since 2019-08-12
 */
@Service("deviceParamDictService")
public class DeviceParamDictServiceImpl implements DeviceParamDictService {

    @Autowired
    DeviceParamDictMapper deviceParamDictMapper;

    /**
     * 通过key获取终端版本
     *
     * @param paramKey
     * @param paramType
     * @return
     */
    @Override
    public DeviceParamDictDto getByParamKey(String paramKey, Integer paramType) {
        DeviceParamDictBean deviceParamDictBean = deviceParamDictMapper.getByParamKey(paramKey, paramType);
        return Convert.toDeviceParamDictDto(deviceParamDictBean);
    }

}
